package com.example.studyFile.asynchronousOptimization;

import org.springframework.http.MediaType;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;


/**
 * @author 刘果
 * @date Created in 15:04 2022/3/14
 * 常用却又容易忘记的常量
 */
public class CommonConstants {

    public static final String CONTENT_TYPE_UTF8_STR = MediaType.APPLICATION_JSON_UTF8_VALUE;
    public static final MediaType CONTENT_TYPE_UTF8_MEDIA = MediaType.APPLICATION_JSON_UTF8;
    public static final String CHARSET_UTF8_STR = StandardCharsets.UTF_8.displayName();
    public static final Charset CHARSET_UTF8 = StandardCharsets.UTF_8;

    public static final String SUCCESS_DESC = "success";
    public static final String SUCCESS_DESC_ZH = "请求成功";

    public static final String NOTICE_MAIL_LIMIT = "noticeLimit-mail-frequency";
    public static final String NOTICE_MSG_LIMIT = "noticeLimit-msg-frequency";

    //验证码类型 1-短信 2-邮箱
    public static final String CHECK_TYPE_INNER = "1";
    public static final String CHECK_TYPE_OUTER = "2";

    public static final String IS_ADMIN_USER = "admin";
    /**
     * 通用错误编码
     */
    public static final Integer UNIVERSAL_ERROR_CODE = 9999;

    public static final String ERROR_STR = "error";

    public static final String HEADERS = "headers";

    public static final String TXT = "txt";
    public static final String XLSX = "xlsx";
    public static final String ZIP = "zip";

    public static final String NULL_STR = "null";

    public static final String DOT = ".";

    public static final String SLASH = "/";

    public static final String HYPHEN = "-";

    public static final String EMPTY_STR = "";

    public static final String COMMA = ",";

    public static final String SEMICOLON = ";";

    public static final String AND_SYMBOLS = "&";

    public static final String EQUAL_SYMBOLS = "=";

    public static final String CAESURA_SIGN= "、";
}
